#include <stdio.h>
int main()
{
  int a,b,c,d,e,f,g;
  printf("Enter number: ");
  scanf("%d", &a);
  if (a / 100 >= 1 && a / 100 < 10)
    {
       b = a / 100;
       c = a / 10;
       d = c / 10;
       e = c - d * 10;
       f = a - b * 100 - e * 10;
       printf("%d\t%d\t%d", f, e, b);
    }
   else if (a / 10 >= 1 && a / 10 < 10)
    {
	  b = a / 10;
	  c = a - b * 10;
	  printf("%d\t%d", c, b);
	}
	else if (a < 10)
	  {
	     printf("%d", a);
	  }
	else if (a / 1000 >=1 && a / 1000 < 10) 
	{
	  g = a / 1000;
	  b = a / 100;
	  b = b - g * 10;
	  c = a / 10;
	  c = c - g * 100 - b * 10;
	  d = a - g * 1000 - b * 100 - c * 10;
	  printf("%d\t%d\t%d\t%d", d, c, b, g);
	}
	else if (a / 10000 >= 1 && a / 10000 < 10)
	  {
	    g = a / 10000;
		b = a / 1000;
		b = b - g * 10;
		c = a / 100;
		c = c - g * 100 - b * 10;
		d = a / 10;
		d = d - g * 1000 - b * 100 - c * 10;
		f = a - g * 10000 - b * 1000 - c * 100 - d * 10;
		printf("%d\t%d\t%d\t%d\t%d", f, d, c, b, g);
	  }
}